Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Background Enhancements Part 1 #560

Merged
merged 30 commits into from
Aug 25, 2024
Merged

Custom Background Enhancements Part 1 #560

merged 30 commits into from
Aug 25, 2024

Conversation

Cryotechnic
Copy link
Collaborator

@Cryotechnic Cryotechnic commented Aug 18, 2024

Main Goal

The initial goal of this PR is to bring the background changing functionality into the Quick Settings menu for easier access. This works exactly in the same way as the one in Game Settings does.

The end-goal of this change is to eventually remove the button from the Application Settings page and have it reside exclusively in Quick Settings, as background assets will be managed on a per-game and per-region basis (hence "Part 1").

PS. This feature does not require global App custom background to be enabled. Simply go to the "Additional Button" in home page (bottom right) and change the toggle and background there.

  • [New]: Add background change to quick settings menu

PR Status :

  • Overall Status : In Progress
  • Commits : In Progress
  • Synced to base (Collapse:main) : Yes
  • Build status : OK ✅
  • Crashing : No

TODO

  • Fix issue where bool value is not applied to ToggleSwitch for both Custom Args & Region Background toggles
  • Fix i18n for Button and StackPanel Text properties
  • Validate if bool applies to Application Settings page if it is changed in Quick Settings
  • Fix issue where applying a video background to a different game/region that has an image applied will hard crash the application OR no longer apply media to the container.

This was apparently an old bug since video background were ever implemented, but we forgor so we spent at least 4 man hours trying to find the issue and it was an Opacity that was set to 0 and never gets set back to 1. welp.

@Cryotechnic Cryotechnic linked an issue Aug 18, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Aug 18, 2024

Qodana for .NET

5 new problems were found

Inspection name Severity Problems
Redundant using directive 🔶 Warning 4
Redundant nullable directive 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Detected 53 dependencies

Third-party software list

This page lists the third-party software dependencies used in CollapseLauncher

Dependency Version Licenses
Clowd.Squirrel 2.11.1 MIT
CommunityToolkit.Common 8.2.2 MIT
CommunityToolkit.Mvvm 8.2.2 MIT
CommunityToolkit.WinUI.Animations 8.1.240821 MIT
CommunityToolkit.WinUI.Behaviors 8.1.240821 MIT
CommunityToolkit.WinUI.Controls.ImageCropper 8.1.240821 MIT
CommunityToolkit.WinUI.Controls.Primitives 8.1.240821 MIT
CommunityToolkit.WinUI.Controls.SettingsControls 8.1.240821 MIT
CommunityToolkit.WinUI.Controls.Sizers 8.1.240821 MIT
CommunityToolkit.WinUI.Converters 8.1.240821 MIT
CommunityToolkit.WinUI.Extensions 8.1.240821 MIT
CommunityToolkit.WinUI.Helpers 8.1.240821 MIT
CommunityToolkit.WinUI.Media 8.1.240821 MIT
CommunityToolkit.WinUI.Triggers 8.1.240821 MIT
GitInfo 3.3.5 MIT
Google.Protobuf.Tools 3.27.1 PROTOBUF
Google.Protobuf 3.27.2 BSD-3-Clause
Google.Protobuf 3.27.3 BSD-3-Clause
H.GeneratedIcons.System.Drawing 2.1.3 MIT
H.NotifyIcon.WinUI 2.1.3 MIT
H.NotifyIcon 2.1.3 MIT
Hi3Helper.ZstdNet 1.6.2 BSD-3-Clause
HtmlAgilityPack 1.11.64 MIT
ImageEx 2.1.1 MIT
Markdig.Signed 0.37.0 BSD-2-Clause
Microsoft.CSharp 4.7.0 MIT
Microsoft.Graphics.Win2D 1.2.0 MS-ASP-NET-WEB-OPTIMIZATION
Microsoft.NET.ILLink.Tasks 8.0.5 MIT
Microsoft.NETCore.Platforms 8.0.0-preview.7.23375.6 MIT
Microsoft.NETCore.Targets 6.0.0-preview.4.21253.7 MIT
Microsoft.Win32.Registry 5.0.0 MIT
Microsoft.Win32.SystemEvents 8.0.0 MIT
Microsoft.Windows.SDK.BuildTools 10.0.26100.1 PROPRIETARY-LICENSE
Microsoft.WindowsAppSDK 1.5.240802000 MIT
MS-DXSDK-D3DX-9.29.952.3
Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9 MIT
PhotoSauce.MagicScaler 0.14.2 MIT
PhotoSauce.NativeCodecs.Libwebp 1.3.2-preview3 MIT
Roman-Numerals 2.0.1 MIT
SharpCompress 0.37.2 MIT
SharpHDiffPatch.Core 2.2.7 MIT
System.Diagnostics.EventLog 8.0.0 MIT
System.Drawing.Common 8.0.8 MIT
System.IO.Hashing 8.0.0 MIT
System.Security.AccessControl 6.0.1 MIT
System.Security.Cryptography.ProtectedData 8.0.0 MIT
System.Security.Principal.Windows 5.0.0 MIT
System.Text.Encoding.CodePages 8.0.0 MIT
System.Text.Encodings.Web 8.0.0 MIT
System.Text.Json 8.0.4 MIT
System.Threading.Tasks.Extensions 4.5.4 MIT
TaskScheduler 2.11.0 MIT
ThisAssembly.Constants 1.4.1 MIT
ZstdSharp.Port 0.8.1 MIT
Contact Qodana team

Contact us at [email protected]

@@ -1,7 +1,9 @@
using CollapseLauncher.CustomControls;
using CollapseLauncher.Extension;
using CollapseLauncher.FileDialogCOM;

Check warning

Code scanning / QDNET

Redundant using directive Warning

Using directive is not required by the code and can be safely removed
using CollapseLauncher.Helper;
using CollapseLauncher.Helper.Animation;
using CollapseLauncher.Helper.Image;

Check warning

Code scanning / QDNET

Redundant using directive Warning

Using directive is not required by the code and can be safely removed
@@ -9,6 +9,7 @@
using CollapseLauncher.Helper;
using CollapseLauncher.Helper.Animation;
using CollapseLauncher.Helper.Image;
using CollapseLauncher.Helper.Background;

Check warning

Code scanning / QDNET

Redundant using directive Warning

Using directive is not required by the code and can be safely removed
@@ -18,6 +19,7 @@
using CommunityToolkit.WinUI.Animations;
using H.NotifyIcon;
using Hi3Helper;
using Hi3Helper.Data;

Check warning

Code scanning / QDNET

Redundant using directive Warning

Using directive is not required by the code and can be safely removed
bagusnl and others added 2 commits August 25, 2024 14:28
This to prevents NRE when saving settings that is not previously fetched, in the case of HSR and GI.
@Cryotechnic Cryotechnic marked this pull request as draft August 25, 2024 08:15
@bagusnl bagusnl marked this pull request as ready for review August 25, 2024 16:00
@bagusnl
Copy link
Member

bagusnl commented Aug 25, 2024

All good, signed by me and neon in vc

proof(tm)
image

@bagusnl bagusnl merged commit 1d1685a into main Aug 25, 2024
4 checks passed
@bagusnl bagusnl changed the title [WIP] Custom Background Enhancements Part 1 Custom Background Enhancements Part 1 Aug 25, 2024
@Cryotechnic Cryotechnic deleted the custom-game-bg branch August 25, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request]: one different Custom Background for each game
3 participants